package com.hs.gs.web;

import java.util.List;

import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.hs.gs.domain.EvaluationCategory;

@RooWebScaffold(path = "evaluationcategorys", formBackingObject = EvaluationCategory.class)
@RequestMapping("/evaluationcategorys")
@Controller
public class EvaluationCategoryController {
	
	@RequestMapping(value = "/xml")  
	public ModelAndView getAuthorById(Model uiModel) {
		List<EvaluationCategory> categories = EvaluationCategory.findAllEvaluationCategorys();
	    ModelAndView mav =new ModelAndView("bookXmlView", BindingResult.MODEL_KEY_PREFIX + "categories", categories);  
	    return mav;  
	}

}
